﻿using System;
using System.Collections.Generic;
using System.Reflection;
using EsbMonitorMessages;
using EsbMonitorMessages.Events;
using NServiceBus;

namespace TestReflection
{
 
    internal class Program
    {
        private static void Main(string[] args)
        {
            Assembly assembly = typeof (IPublisherStarted).Assembly;

            Type[] types = assembly.GetTypes();

            foreach (Type type in types)
            {
                if (typeof (IMessage).IsAssignableFrom(type))
                {
                    PropertyInfo[] properties =
                        type.GetProperties();

                    Console.WriteLine(type);
                }
            }

            Console.ReadLine();
        }
    }
}